home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacAddict 125
/
MacAddict_125_2007_01.iso
/
Software
/
Interface
/
sqreensavers 1.0.dmg
/
plasq sqreensavers.pkg
/
Contents
/
Resources
/
postflight
< prev
next >
Wrap
Text File
|
2006-08-02
|
1KB
|
58 lines
#!/bin/sh
# The plasq screen savers have been written to the root directory and need to
# be moved to either:
# "/Library/Screen Savers" or
# "~/Library/Screen Savers".
# The text file here knows where to write the files based upon the user's
# selection in the installer.
destdir=`cat /tmp/plasqscreensaverdestination.txt`
if [ "$destdir" != "" ]
then
if [ ! -d "$destdir" ]
then
# create the screen savers directory if it doesn't already exist.
echo Creating \""$destdir"\" directory
mkdir "$destdir"
if [ `echo $destdir | cut -c1-8` = "/Library" ]
then
# common dir
chmod 775 "$destdir"
else
# user dir
chown $USER "$destdir"
chmod 755 "$destdir"
fi
fi
ls -d /plasq*.saver | while read file
do
if [ "$file" != "" ]
then
fullpath=$destdir$file
rm -fr "$fullpath"
mv -f "$file" "$fullpath"
echo Moving \""$file"\" to \""$fullpath"\"
if [ `echo $destdir | cut -c1-8` = "/Library" ]
then
# common dir
chmod -R 775 "$fullpath"
else
# user file - group is same as user name
chown -R $USER:$USER "$fullpath"
chmod -R 755 "$fullpath"
fi
fi
done
fi
# cleanup
rm -rf /plasq*.saver
rm -f /tmp/plasqscreensaverdestination.txt